<!DOCTYPE html>
<html>
  <head>
    <style>
      div#bs-console{ border:1px solid black }
      div#dumparea{ border:1px solid black }
      div#dumparea div{ border-bottom: 1px solid black; margin:0 }
      span.dump_opecode{ color:orange; }
      span.dump_env{ color:goldenrod; }
      span.dump_stackframe{ color:cornflowerblue; }
      span.dump_closure{ color:limegreen; }
      span.dump_constant{ color:limegreen; }
      td.dump_dead{ color:lightgray; }
      td.dump_stknum{ color:gold; }
    </style>
  </head>
<body>
  <form>
    <input type=button value="&lt;" onclick="BiwaScheme.Interpreter.dumper.dump_move(-1)">
    <input type=button value="&gt;" onclick="BiwaScheme.Interpreter.dumper.dump_move(1)">
    <input type=button value="all" onclick="BiwaScheme.Interpreter.dumper.dump_toggle_fold()">
  </form>
  <div id='dumparea'></div>

  <pre id="code">;; write your code here
(print 'hello)</pre>

  <div id='bs-console'></div>

  <script type="text/javascript" src="../src/development_initializer.js" charset="utf-8"></script>
  <script type="text/javascript">
    var dumper = new BiwaScheme.Dumper();
    BiwaScheme.Interpreter.dumper = dumper;

    var code = $("#code").html();

    (new BiwaScheme.Interpreter(function(e){
      Console.puts(e.message);
      console.error(e);
      throw e;
    })).evaluate(code);

    dumper.dump_move(1);
  </script>
</body>
</html>
<!-- vim:set ft=javascript: -->
